# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=python-pyexcel-xlsx
_pkgname=pyexcel-xlsx
pkgver=0.6.1
pkgrel=1
pkgdesc='A wrapper library to read, manipulate and write data in xlsx and xlsmformat.'
arch=('any')
url='https://pypi.org/project/pyexcel-xlsx/#files'
license=('BSD')
depends=('python' 'python-pyexcel-io' 'python-openpyxl')
makedepends=('python-setuptools')
source=("https://files.pythonhosted.org/packages/source/${_pkgname::1}/$_pkgname/$_pkgname-$pkgver.tar.gz")
sha512sums=('63af47b1372c37a7098ad56e033726387d9b131632b3bfb2c18e2fb560f822c68b3d84c69e72a77e04b1c1d21b5e81a5f50efb70a2b6f13efe637ab8aef627c5')

prepare(){
  cd "$_pkgname-$pkgver"

  sed -i 's/openpyxl>=2.5.0,<2.6.0/openpyxl/g' setup.py
  sed -i 's/pyexcel-io>=0.5.3/pyexcel-io/g' setup.py
}

build() {
  cd "$_pkgname-$pkgver"

  python setup.py build
}

package() {
  cd "$_pkgname-$pkgver"

  python setup.py install --root="$pkgdir" --prefix=/usr -O1 --skip-build
}

